package com.qumitech.visualnovel.datasource.console;

import com.qumitech.visualnovel.controller.vo.gameData.GameDataQueryDTO;
import com.qumitech.visualnovel.controller.vo.gameData.PlayGameResultDTO;
import com.qumitech.visualnovel.controller.vo.gameData.PlayGameStatisticsDTO;
import com.qumitech.visualnovel.controller.vo.gameData.PlayGameStatisticsListDTO;
import com.qumitech.visualnovel.model.dao.console.PlayGameResult;
import org.apache.ibatis.annotations.Param;

import java.util.HashMap;
import java.util.HashSet;
import java.util.List;

public interface PlayGameResultMapper {
    int deleteByPrimaryKey(Long id);

    int insert(PlayGameResult record);

    int insertSelective(PlayGameResult record);

    PlayGameResult selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(PlayGameResult record);

    int updateByPrimaryKey(PlayGameResult record);

    HashMap<String, Object> enterGameStatisticInfo(GameDataQueryDTO gameDataQueryDTO);
    HashMap<String, Object> startGameStatisticInfo(GameDataQueryDTO gameDataQueryDTO);
    List<PlayGameResultDTO>  getList(GameDataQueryDTO gameDataQueryDTO);
    Integer getCount(GameDataQueryDTO gameDataQueryDTO);

    List<PlayGameStatisticsDTO> getAllGameTimesLine(@Param("startTime") String startTime,
                                                    @Param("endTime") String endTime,
                                                    @Param("accountId") Long accountId,
                                                    @Param("tableList") List<String> tableList);

    List<PlayGameStatisticsDTO> getGameTimesLine(@Param("startTime") String startTime,
                                                 @Param("endTime") String endTime,
                                                 @Param("accountId") Long accountId,
                                                 @Param("gameIdList") String[] gameIdList,
                                                 @Param("tableList") List<String> tableList);

    List<PlayGameStatisticsDTO> getAllGameNumbersLine(@Param("startTime") String startTime,
                                                      @Param("endTime") String endTime,
                                                      @Param("tableList") List<String> tableList);

    List<PlayGameStatisticsDTO> getGameNumbersLine(@Param("startTime") String startTime,
                                                   @Param("endTime") String endTime,
                                                   @Param("gameIdList") String[] gameIdList,
                                                   @Param("tableList") List<String> tableList);

    List<PlayGameStatisticsDTO> getAllGameAverageTimesLine(@Param("startTime") String startTime,
                                                           @Param("endTime") String endTime,
                                                           @Param("tableList") List<String> tableList);

    List<PlayGameStatisticsDTO> getGameAverageTimesLine(@Param("startTime") String startTime,
                                                        @Param("endTime") String endTime,
                                                        @Param("gameIdList") String[] gameIdList,
                                                        @Param("tableList") List<String> tableList);

    Integer getStatisticCount(@Param("startTime") String startTime,
                              @Param("endTime") String endTime,
                              @Param("accountId") Long accountId,
                              @Param("gameIdList") String[] gameIdList,
                              @Param("tableList") List<String> tableList);

    List<PlayGameStatisticsListDTO> getStatisticList(@Param("startTime") String startTime,
                                                     @Param("endTime") String endTime,
                                                     @Param("accountId") Long accountId,
                                                     @Param("gameIdList") String[] gameIdList,
                                                     @Param("tableList") List<String> tableList,
                                                     @Param("offset") Integer offset,
                                                     @Param("limit") Integer limit);






}